<template lang="">
    <div>
        <van-field  label='标题' v-model='form.title'/>
        <van-button @click='submit'>发布</van-button>
    </div>
</template>
<script>
import axios from 'axios'
export default {
    data(){
        return{
            form:{"userid":localStorage.getItem("uid")}
        }
    },
    methods: {
        submit(){
            axios.post('newsM',this.form).then(res=>{
                console.log(res)
                alert('发布成功')
            })
        }
    },
}
</script>
<style lang="">
    
</style>